package com.gobang.gobangboot.service.impl;

import com.gobang.gobangboot.entity.Room.Room;
import com.gobang.gobangboot.entity.Room.RoomCreateDTO;
import com.gobang.gobangboot.mapper.RoomMapper;
import com.gobang.gobangboot.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomServiceImpl implements RoomService {

    @Autowired
    private RoomMapper roomMapper;

    @Override
    public List<Room> list() {

        List<Room> roomList = roomMapper.list();
        System.out.println(roomList);
        return roomList;
    }

    @Override
    public void createRoom(RoomCreateDTO roomCreateDTO) {
        roomMapper.create(roomCreateDTO);
    }


}
